spec: add terminfo & capability layer specification - #130
Open
natemoo-re wants to merge 5 commits into
Open
natemoo-re wants to merge 5 commits into
natemoo-re wants to merge 5 commits into
Conversation
No changeset neededThis pull request is classified as no_release_impact: no published package |
natemoo-re
added this pull request to stack #134
September 19, 2026 04:29
commit: |
This was referenced Sep 19, 2026
Closed
natemoo-re
marked this pull request as ready for review
September 19, 2026 04:33
cowboyd
reviewed
Sep 28, 2026
The capability reference table linked every slug to the site root. Point each at its category-prefixed page (/extensions/…, /modes/…).
State the C signature and that the parser is internal to detectTerminal(). Returns 0 on success, nonzero on failure; the nonzero values are deliberately unspecified so tests cannot couple to them. Failures never reach public callers, who only observe the resulting Capabilities.
The reducer was exported only so tests could assert (next, bytes) without a live Term, but a Term is cheap to create and performs no IO, and every update test already goes through term.update(). Fold the per-step semantics into Term.update, move the Update type there, and renumber the host loop section.
Widen Update from { width, height } | CapabilityEvent to
{ width, height } | InputEvent. Events other than resize and capability
are no-op steps, so hosts can pass the full scan() events array without
filtering. Only ResizeEvent carries width/height, so the shapes stay
unambiguous. Matches the implementation in #133.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1/4 of the terminfo foundation stack (supersedes the mixed-history #106, which will be closed once this stack lands). Tracks the spec only — implementation PRs are stacked as drafts and must not merge before this spec is approved, per the spec-driven workflow.
What this adds
specs/terminfo-spec.md(new, normative): the capability layer —Capabilities,Detection, theCapabilityEventunion, the probe model (query batch + DA1 completion fence, sans-IO), compiled terminfo binary parsing (legacy + extended), the baseline capability set, and the progressive-enhancement evidence model.specs/renderer-spec.md: §7.7 update transaction generalized to resize or capability updates; §7.8 defines capability consumption as deliberately deferred — no renderer output changes in this stack; §8.6 specifies theterm.update()public API.specs/input-spec.md: §6 probe-response recognition (how query responses are recognized byte-by-byte and surfaced as events).specs/transitions-spec.md: removes a stale cross-reference note.Review guidance
The spec is the reviewable artifact here; the stacked implementation PRs (#131, #132, #133) conform to it mechanically. Renderer byte output is unchanged across the entire stack — the first gated consumer (color encoding, #60) is a follow-up and deliberately out of scope (§7.8).
Follow-up protocol work is tracked in #129.